package com.ybkj.daijia.server.service;

import com.ybkj.daijia.chart.TableOrderMonthVo;
import com.ybkj.daijia.common.CompanyOrderVo;
import com.ybkj.daijia.common.DirverStatistics;
import com.ybkj.daijia.common.DriverOrderDetailVo;
import com.ybkj.daijia.common.DriverOrderVo;
import com.ybkj.daijia.common.InfoFeeVo;
import com.ybkj.daijia.common.MemberOrderVo;
import com.ybkj.daijia.common.OrderFromSourceVo;
import com.ybkj.daijia.common.OrderTypeVo;
import com.ybkj.daijia.common.PageVo;
import com.ybkj.daijia.common.UserTypeVo;
import com.ybkj.daijia.server.mc.Passenger;
import com.ybkj.daijia.server.model.ChartDay;
import com.ybkj.daijia.server.model.ChartMonth;
import com.ybkj.daijia.server.model.ChartYear;
import com.ybkj.daijia.server.model.Order;
import com.ybkj.daijia.server.sales.Activity;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface ChartYearService {

    /**
     * 添加一条统计记录
     *
     * @param order
     */
    public void addDayRecord(Order order);

    public ChartYear dataForYear(int year, Long companyId);

    public ChartMonth findByYearAndMonth(ChartYear chartYear, Integer month);

    public ChartDay findByMonthAndDay(ChartMonth chartMonth2, int i);

    public ChartYear findByYearAndCompany(int year, Long companyId);

    public ChartDay dataForDay(Integer year, Integer month, Integer day, Long companyID);

    public List<CompanyOrderVo> exportcompanyOrder(Date start, Date end);

    public PageVo<DirverStatistics> driverOrder(Date start, Date end, Long companyId, String name,
        Integer offset, Integer size);

    public PageVo<InfoFeeVo> infoFee(Date start, Date end, Long companyId);

    public List<InfoFeeVo> exportInfoFee(Date start, Date end, Long companyId, boolean allAmount,
        Integer amounts);

    public PageVo<DriverOrderDetailVo> driverOrderDetail(Long driverId, Date start, Date end);

    public List<DriverOrderDetailVo> exportDriverOrderDetail(Long driverId, Date start, Date end,
        boolean allAmount, Integer amounts);

    public PageVo<OrderTypeVo> orderType(Date start, Date end, Long companyId);

    public PageVo<UserTypeVo> userType(Date start, Date end, Long companyId);

    public PageVo<OrderFromSourceVo> orderFromSource(Date start, Date end, Long companyId);

    public List<OrderFromSourceVo> exportSource(Date start, Date end, Long companyId,
        Integer amounts);

    public List<TableOrderMonthVo> tableOrderMonth(Calendar calendar, Long companyId);

    public List<TableOrderMonthVo> exportTableOrderMonth(Calendar calendar, Long companyId);

    public List<TableOrderMonthVo> tableOrderDay(Calendar calendar, Long companyId);

    public List<TableOrderMonthVo> exportTableOrderDay(Calendar calendar, boolean allAmount,
        Integer amounts);

    public PageVo<Activity> activity(Long companyId, String title, Date start, Date end);

    public List<Activity> exportActivty(Long companyId, String title, Date start, Date end,
        boolean allAmount, Integer amounts);

    public PageVo<MemberOrderVo> memberOrder(Date start, Date end, String name, Long companyId,
        Long gradeId, Integer type);

    public List<MemberOrderVo> newMemberOrder(Date start, Date end, Long companyId);

    public List<MemberOrderVo> exportMemberOrder(Date start, Date end, String name,
        boolean allAmount, Integer amounts, Long companyId);

    public Long countIntroduce(Long companyId, String param);

    public PageVo<DriverOrderVo> introduce(Long companyId, String param, Date start, Date end);

    public List<DriverOrderVo> exportIntroduce(Long companyId, String param, Date start, Date end,
        boolean allAmount, Integer amounts);

    public List<CompanyOrderVo> companyOrder(Date start, Date end);

    public Map<String, Object> compositive(Long companyId, Date start, Date end);

    public Map<String, Object> paotuiCompositive(Long companyId, Date start, Date end);

    public List<List<String>> tableNewMemberMonth(Calendar calendar, Long companyId);

    public Long tableNewMemberMonthDetailCount(String fromSource, Integer year, Integer month,
        Long companyId);

    public PageVo<Passenger> tableNewMemberMonthDetailData(String fromSource, Integer year,
        Integer month, Long companyId);

    public List<Passenger> exportTableNewMemberMonthDetail(String fromSource, Integer year,
        Integer month, Long companyId, boolean allAmount, Integer amounts);

    public Map<String, Object> zhuanCompositive(Long companyId, Date start,
        Date end);

    public Map<String, Object> freightCompositive(Long companyId, Date start,
        Date end);

    public Map<String, Object> zhuanxianCompositive(Long companyId, Long lineId, Date start,
        Date end);


    PageVo<DriverOrderDetailVo> driverOrderDetailCount(Long driverId, Date start, Date end);

    public void updateByPrimaryKey(ChartYear chartYear);
}
